home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
art&graf.ix
/
art-3139
/
boot_pic.mug
/
pi1_prog.s
< prev
next >
Wrap
Text File
|
1987-04-21
|
3KB
|
111 lines
;
; Degas '.PI1' Picture & Program Loader v1.0 !!
; ---------------------------------------------
;
; Coded by: Mike Mee (but credit MUG U.K if ya use it Bruce !!)
;
; v1.0 - Adapted from Degas Picture Booter v1.0
;
; DEGAS pictures:- 0 - 1 = resolution
; 2 - 33 = palette data
; 34 - 32033 = picture data
; Use Degas pictures that are 32034 or 32066 in length, and alter the
; appropriate line for the pictures' length !!
; Best used on a disk where all programs 'AUTO' load from the menu
; and not from desktop - as GEM will not be resident at all !!
; No idea if this works on an 512K ST/512K or 1040K STE !!
; Although no illegal routines are employed - so it should work OK !!
pic_adr equ $20000
yes equ 1
no equ 0
text_on equ no ; no = saving of 12 bytes + length of text
opt p+,o+,d-,s-
bra.s start
dc.b "Coded by: MUG U.K",191," - 16/10/1991",0
start
ifne text_on
pea text(pc)
move.w #9,-(a7)
trap #1
addq.w #6,a7
endc
lea filename(pc),a0 ; file to load
move.l #pic_adr-34,d6 ; destination address
move.l #32066,d7 ; length = 32066
loadit lea handle(pc),a6 ; handle storage
clr.w -(a7) ; mode = 0 (open to read)
move.l a0,-(a7) ; filename to open
move.w #$3d,-(a7) ; f_open
trap #1 ; do it !!
addq.l #8,a7 ; tidy stack
move.w d0,(a6) ; store file handle returned
move.l d6,-(a7) ; address to load to
move.l d7,-(a7) ; amount to read in
move.w d0,-(a7) ; file handle
move.w #$3f,-(a7) ; f_read
trap #1 ; do it
adda.l #$c,a7 ; tidy stack
move.w (a6),-(a7) ; file handle
move.w #$3e,-(a7) ; f_close
trap #1 ; do it !!
addq.l #4,a7 ; tidy stack
lea pic_adr-32,a0 ; pictures palette
lea $ffff8240.W,a1 ; ST palette
movem.l (a0),d0-d7 ; move from one
movem.l d0-d7,(a1) ; to the other
move.l $44e.w,a0 ; current screen address
lea pic_adr,A1 ; source
move.w #$1F3F,D0 ; (32000/4)-1 = 7999 ($1f3f)
bmove move.l (A1)+,(A0)+ ; move it
dbf d0,bmove ; loop
pea null(pc) ; Command line
pea null(pc) ; Environment string
pea progfile(pc) ; Filename
clr.w -(sp) ; Load & execute
move.w #$4b,-(sp) ; p_exec
trap #1 ; do it !!
lea 16(sp),sp ; tidy stack
exit rts ; bye bye
null dc.l 0
filename dc.b 'a:\test.pi1',0
progfile dc.b 'a:\menu.prg',0
ifne text_on
text dc.b $1B,'E'
dc.b $1b,89,42,35 ; Text at 10 down & 3 in !!
; 0123456789012345678901234567890123456789 - 40 chars
dc.b 'Virus Free Disk From The Source !!',0
endc
handle ds.w 1
;
; Alter length of 'blanks' to ensure length of bootsector is equal
; to 480 bytes !!
;
ifne text_on
blanks ds.w 118 ; amount when text function is on
elseif
blanks ds.w 145 ; and when it's off
endc